package com.videoanswer.van.common.constant;

/**
 * Created with IntelliJ IDEA.
 * User: Darren
 * Date: 10/16/13
 * Time: 2:05 PM
 * To change this template use File | Settings | File Templates.
 */
public enum Gender {
    MALE("male"),
    FEMALE("female");

    private String text;

    Gender(String text) {
        this.text = text;
    }

    public String getText() {
        return this.text;
    }

    public static Gender fromString(String text) {
        if (text != null) {
            for (Gender b : Gender.values()) {
                if (text.equalsIgnoreCase(b.text)) {
                    return b;
                }
            }
        }
        return null;
    }
}
